PATH  Mac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Icon Services and Utilities
>
Obtaining and Using Icons With Icon Services

   

RegisterIconRefFromIconFamily

Adds an iconFamily -derived IconRef to the Icon Services registry.

pascal OSErr RegisterIconRefFromIconFamily (
                     OSType creator,
                     OSType iconType,
                     IconFamilyHandleiconFamily,
                     IconRef*iconRef);

creator
A value of type OSType specifying the creator code of the desired icon. You can use your application's creator code, for example.

Note

Lower-case creator codes are reserved for the System.

iconType
A value of type OSType specifying the type code of the desired icon.

iconFamily
A handle specifying the iconFamily data structure to register.

iconRef
A pointer to a value of type IconRef . On return, this value contains a reference to the desired icon data.

function result
A result code. See Icon Services Result Codes for a description of possible return values.
DISCUSSION
Consider using the function RegisterIconRefFromIconFile, since the data registered using the RegisterIconRefFromIconFamily function cannot be purged. You are responsible for disposing of the IconRef by using the function ReleaseIconRef.

Calling this function increments the reference count of the IconRef .


© 1999 Apple Computer, Inc. – (Last Updated 03 Dec 99)